#!/bin/bash

make_key()
{
	if [ ! -f /etc/ssh/$1 ]; then
		echo "Generating $2 key: /etc/ssh/$1"
		ssh-keygen -q -t $2 -N '' -f /etc/ssh/$1
		chmod 600 /etc/ssh/$1
		chmod 644 /etc/ssh/$1.pub
	fi
}

make_key ssh_host_rsa_key rsa&
make_key ssh_host_ed25519_key ed25519

wait

